#include "Dog.h"

Dog::Dog(){
	cout << "Dog() init" << endl;
}
Dog::Dog(int age){
	cout << "Dog("<< age << ") init age" << endl;
	this->age = age;
}
Dog::Dog(int age, int age2){
	this->age = age + age2;
	cout << "2 param Dog("<< this->age << ") init age" << endl;
}
Dog::Dog(const Dog& dog){
	cout << "Dog() copy init" << endl;
	this->age = dog.age + 1;
}
Dog::~Dog(){
	cout << "Dog("<< this->age <<") destroy" << endl;
}
void Dog::ha(){
	cout << "ha()" << endl;
}
	
void Dog::setName(string name){
	// this 是当前对象的指针
	this->name = name;
}

void Dog::say(){
	cout << "name is " << name << ", age is "<< age 
		<< " birthday is " << birthday << endl;
}